<?php
    header("Access-Control-Allow-Origin: *");
    $servername = "localhost";
    $username = "tfsgz";
    $password = "2ZEcT4PW6m8wfEHA";
    $mysqlname = "tfsgz"; 
    
    $id = $_POST['id'];
	$keys = $_POST['keys'];
	$values = $_POST['values'];
	
	
    $conn = mysqli_connect($servername, $username, $password, $mysqlname);
    // $sql = "UPDATE config SET keys = '$keys', values = '$values' WHERE id = '$id'";
    $sql = "UPDATE `tfsgz`.`config` SET `values` = '$values', `keys` = '$keys' WHERE `config`.`id` = $id;";
    $result = $conn->query($sql);

    if($result){
		echo '修改成功';
	}else{
		echo "修改失败";
	}
    
?>